package org.ravenhearte.hardboild.gamelogic;

import java.util.LinkedList;

import org.ravenhearte.hardboild.gamelogic.SkillSet.Type;
import org.ravenhearte.hardboild.gui.Container;

import com.jme.renderer.ColorRGBA;

public abstract class Skill {
	private int cost;
	private String name;
	private Type type;
	private SkillSet parent;
	private OnSelect onSelect;
	ColorRGBA color;
	private int skillPoints;
	public enum OnSelect { TARGET, OPTION, EXECUTE };
	
	public Skill(String name, Type type, OnSelect onSelect, ColorRGBA color) {
		this.name = name;
		this.type = type;
		this.onSelect = onSelect;
		this.color = color;
	}
	
	public void setParent(SkillSet parent) {
		this.parent = parent;
	}
	
	protected void setCost(int cost) {
		this.cost = cost;
	}
	
	public int getCost() {
		return cost;
	}
	
	public void increaseSkill(int amount) {
		skillPoints += amount;
	}
	
	public String getName() {
		return name;
	}
	
	public Type getType() {
		return type;
	}
	
	public ColorRGBA getColor() {
		return color;
	}
	
	public OnSelect onSelect() {
		return onSelect;
	}
	
	public SkillSet getParent() {
		return parent;
	}
	
	public int getSkillPoints() {
		return skillPoints;
	}

	public abstract LinkedList<String> getTargetRange();
	
	public abstract Container getOptions();

	public abstract void performSkill(GameTile tile);
	
	public abstract int getRanking();
}
